package com.smart.enums;

public enum UseEcpTplMsgEnum {
    FIRST("first","电子券核销成功！"),
    KEYWORD1("keyword1","券名"),
    KEYWORD2("keyword2","有效期"),
    KEYWORD3("keyword3","核销人"),
    KEYWORD4("keyword4","核销门店");


    private String code;
    private String name;
    UseEcpTplMsgEnum(String code, String name){
        this.code = code;
        this.name = name;
    }

    public static String getName(String code){
        for (UseEcpTplMsgEnum obj : UseEcpTplMsgEnum.values()) {
            if(obj.getCode().equals(code)){
                return obj.getName();
            }
        }
        return "";
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }
}
